Repository navigation
feat(web): the window's first screens, with profit and loss and a balance sheet (0.7.0) - #6
Merged
Merged
Conversation
Minor units, thousandths and basis points become text and back without a float.
Rows are kept by key; new data updates the text of the cells that changed, adds and removes single rows, and never rebuilds the table. The empty line, the error line and the totals row sit in reserved space.
The engine exposes its api client and a route is any view's id.
The two parts the document forms share, as typed handles with nothing behind them yet.
A view declares its id, title and group; the sidebar and the page sections are made once at start, a view is built the first time it is shown, and the address keeps the place across a reload.
FORMLEDGER_UI_PORT and FORMLEDGER_SERVER_PORT move the dev server and its proxy target, so two copies can run side by side.
Group posted and cancelled journal lines by account type into income, expense, asset, liability and equity sections with totals; the balance sheet carries the unclosed result into equity.
Serve GET /api/reports/profit-and-loss and /api/reports/balance-sheet behind reports.read, mounted from the reports module.
Trial balance, general ledger, both ageings and stock valuation with its tie to the ledger, as plain calls with no DOM.
…t type The seven document lists share one spec each: route, kind, party side, form to open and the right to make a draft. loadPage maps each server shape to one row type.
Describes the six setup lists as specs and adds the list, create and update calls plus the form-to-body conversion, with no DOM.
Adds the engine module for both payment families: list, read, draft, post, allocate and cancel, plus the party list, deposit accounts and open invoices.
Fixed-size list and form panel layout for the setup views, with sizes declared on the root class.
Fetches each lookup list once, following pages, and filters it by code or name for the pickers.
The picker filters the cached list as you type, floats a fixed set of rows in an overlay layer, and takes arrow keys, Enter and Escape.
One spec per family names its routes, kinds, party and make steps; the calls load, save, confirm, cancel, amend and convert a document and read the server's totals as integers.
Reads a delivery note or a goods receipt into one shape with its lines, warehouse and party, and posts or cancels it.
Registers the six setup views in group Setup, each a keyed table filled once from the server on first show.
Own size properties on the root class, space tokens only, a bar and status line of reserved height.
Five read-only views on mountTable with a fixed filter bar; a filter change patches rows in place and a late answer is dropped.
Each spec becomes one view built once on mount on the shared table; the status filter lives in the address and a reload patches rows by key.
Every region of a list has its size before data arrives, declared as custom properties on the list root, so rows and counts never move the page.
Print profit and loss over a date range and the balance sheet as of a day from the new report routes.
Builds the form once per view, fills it in place from the opened row, marks the row, and locks the fields that cannot change after create.
Saves through the typed calls, sends only changed fields on edit, shows the server's sentence in a reserved line, and patches the one row in place.
Two keyed lists on the shared table with a status filter kept in the address, a totals row and a new payment button shown only to those who may draft.
Engine module with the statement shapes and the two report calls, no DOM.
Each row holds an item picker, description, quantity, unit price and tax picker, with total cells that only setTotals writes; rows are added and removed one at a time.
Column widths, row height and the error strip are custom properties on the grid root, so no row changes size when it gets text.
… tax A line naming an item sends only the fields the person filled, so the server fills the rest from the item instead of overriding them with empty values.
The visible Status label now names its select for assistive technology, in place of a separate aria label.
Explains the per-list spec, how delivery notes get party names and amounts, and how the filter and paging patch rows.
Views delivery-note and goods-receipt show the document read-only with party, date, warehouse and keyed lines, with post and cancel enabled by status and a way back to the list.
Fixed field, header, error and action heights and column widths declared on the view's root class, so loading data and errors never move anything.
Routes, sign conventions, how the unclosed result reaches equity, and the IAS 1 source named for the layout.
Records the shared shell, the per-currency totals line and the two-place amount default.
Drop the hand-rolled replace helper in the statement query builder.
Why the unclosed result sits in equity and how the routes pick their default dates.
Fixed section heights, address-kept dates and stale-answer handling for the two statement views.
The balance sheet sections said no lines in this range; they are as of one day, so they now say on this day.
The document form mounts the grid before it knows the currency, so the totals block no longer reads a stray space.
The form learns the currency from the party or the saved document, so setCurrency rewrites the total label and price places in place.
Rows of invoices a post fully paid no longer jump to the end of the table; the list is ordered by invoice number so a refresh only rewrites cells.
The status mark no longer moves sideways when a draft gets its number, which the throttled browser check showed as a small layout shift.
The floating list follows its input on scroll and resize while open, and opens upward when there is no room below.
Records why the picker makes its own overlay layer, how lookups are cached and how setTotals maps to rows.
A delivery note's lines carry only item ids, so the item list is read once and cached to show each line's code.
Records why both payment directions share one family table, how the remainder is worked out, and how delivery note ids are turned into names.
Confirm or Post on an unsaved draft saves it first and then posts it, and the permission it needs follows the kind picked for the new draft.
Records the reasoning for the spec table, locked fields and typed account codes.
A footer under the table moved down each time rows arrived, which measured as layout shift under throttling; the count and Load more now sit in the fixed bar above the rows.
The count and the load-more button moved into the bar, leaving the footer's rules and its height unused.
What each screen shows, how to get around, and what is not there yet.
The harness skill no longer says there are no screens, and names the registry, the parts and the engine layer.
The status line lists the screens and says they are only partly checked.
Enter now picks an exact code match first, else the row shown for the current text, else the first match, waiting for the list when it has not loaded, so a fast Enter no longer leaves a row without its item.
Moves every version site to 0.7.0 and adds the 0.7.0 section to the changelog.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
feat(web): the window's first screens, with profit and loss and a balance sheet (0.7.0)
Summary
GET /api/reports/profit-and-lossandGET /api/reports/balance-sheet, built on the same posted journal lines as the trial balance, guarded byreports.read, with./formledger cli statement plandbs. There is no year-end close yet, so the balance sheet shows the result so far as "Unclosed result" inside equity.Commits
63 commits. The short hashes change when the commits are signed, so they are left out.
Version
v0.7.0 (release commit is last). Version sites bumped:
internal/app/version.go,web/package.jsonand both fields of its lock,src-tauri/tauri.conf.json,src-tauri/Cargo.tomland the app's entry insrc-tauri/Cargo.lock, theMakefile, and the fourHASHOUT_LOG.mdheaders.Checks
go build ./...,go vet ./...andgofmt -l cmd internalwere clean at the head. The web type check passed.go build ./...was run: all 63 build.validate_skill.pyreported 0 FAIL and 0 WARN.Not run by the person assembling this change: the window in a browser. Not run by anyone: the CI workflow on GitHub for these commits;
tauri build; a twenty-line invoice in the real form after the picker change; purchase documents in the form; a payment made; a goods receipt or delivery note that posts; editing an existing setup row; a tax rate save. These were run by the build agents and not repeated: profit and loss equal to income minus expenses of the trial balance for a year and for one month, and a balance sheet that balances on two days, against a ledger seeded through the API; the document lists in a built copy with the machine and network slowed (paging adds exactly the new rows; movement on screen 0.0016 after a fix); the two statements in a built copy (correct numbers; 0.0121, not traced); the payment form (post, allocation and remainder correct; 0.005); the ledger screens (0.0095 on the trial balance, from the totals row); the grid on a stand-in page (twenty lines typed, nothing moving without input). No tests exist, by the owner's rule.Merging
Merge with a merge commit so each commit and its signature stays. Do not squash.